home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Glitch Apple Disk Collection
/
2014.glitch.apple.collection.zip
/
indexed
/
IFRSIM.DSK
/
DAYTONA ILS.bas
< prev
next >
Wrap
BASIC Source File
|
2014-09-09
|
3KB
|
107 lines
20 S = 100:S1 = 0:UP = 24579
30 ST = 24576:O1 = ST +56:O2 = ST +58:I1 = ST +60:I2 = ST +61:MA = ST +12:X1 = ST +26:Y1 = ST +28:AL = ST +87
40 SH = ST +09:PL = ST +06:LI = ST +15:XY = ST +18:DF = ST +39:CH = ST +93:WS = ST +42:WW = ST +43:WN = ST +44:WE = ST +45
60 XC = 141:YC = 71:XF = 141:YF = 71
70 TEXT : GOSUB 600
80 MT = 15:GAS = 0:MI = 0:SE = 0:S1 = 0
81 REM
82 REM SET UP WIND DRIFT
83 REM
90 POKE WN,0: POKE WE,0: POKE WS,0: POKE WW,0
100 A% = RND(1) *5:B% = RND(1) *50
110 ON A% GOTO 120,130,140,150
120 POKE WN,B%: GOTO 160
130 POKE WE,B%: GOTO 160
140 POKE WS,B%: GOTO 160
150 POKE WW,B%: GOTO 160
160 CALL ST
165 HTAB 1: VTAB 23: PRINT "WIND ";A%;" AT ";B%;" KNOTS";
170 POKE O1,32: POKE O2,32: POKE I1,48: POKE I2,48
171 REM
172 REM
175 REM OMNI MESSAGE AND
176 REM STARTING X Y CORD
177 REM
180 VTAB 22: HTAB 1: PRINT "OMNI IS ORMOND BEACH 190 DEGREES FROM"
190 POKE X1,145: POKE Y1,80
191 REM
192 REM STARTING ALTITUDE
193 REM
200 POKE AL,16: POKE AL -3,32:MA% = 2
201 REM
202 REM
210 CALL UP
220 S1 = S1 +1: IF S1 >S THEN 270
230 GOTO 210
240 REM
250 REM UPDATE THE CLOCK
260 REM
270 S1 = 0:SE = SE +1: IF SE <60 THEN 280
271 SE = 0:MI = MI +1:GA = GA +1: IF GA = MT THEN 550
272 GOTO 210
280 HTAB 1: VTAB 24: PRINT HO;":";MI;":";SE;" ";
281 REM
282 REM DO ADF AND OMNI
283 REM
290 X = PEEK(X1):Y = PEEK(Y1)
300 IX = XF -X:IY = YF -Y:DY = X -(178 -Y/2):DX = Y -(142 -X/2)
302 REM DO THE ADF
303 REM
310 IF IX = 0 THEN 330
320 IT = IY/IX
330 T1 = ATN(IT)
340 T1% = 16 -10 *T1
350 IF X >XF THEN PF% = (176 -T1%) - PEEK(CH)
360 IF X <XF THEN PF% = (208 -T1%) - PEEK(CH)
370 IF PF% >64 THEN PF% = PF% -64: GOTO 370
380 POKE DF,PF%
381 REM
382 REM DO THE OMNI
383 REM
390 IF DY < -5 THEN DY = -6
400 IF DY >5 THEN DY = 6
410 IF DX < -5 THEN DX = -6
420 IF DX >5 THEN DX = 6
450 POKE O1,32 +DX: POKE I1,48
460 POKE O2,32 -DY: POKE I2,48
461 REM
462 REM DO THE GLIDE SLOPE
463 REM
470 SL = 178 -X:DI = SL - PEEK(AL) *2
471 VTAB 23: HTAB 20: PRINT SL;" ";DI;" ";
480 IF DI >5 THEN DI = 6
481 IF DI < -5 THEN DI = -6
482 IF SL >40 THEN 540
483 IF SL < -10 THEN 540
484 POKE I2,48: POKE I1,48 +DI
540 IF PEEK(AL) >MA% THEN 210
545 REM
546 REM DO THE AIRPORT
547 REM
550 HGR : HCOLOR= 3: CALL 24588
551 REM
552 REM FIRST THE AIRPORT
553 REM
555 HPLOT 178,52: HPLOT TO 190,45
556 HPLOT 187,55: HPLOT TO 192,52
557 HPLOT 189,49: HPLOT TO 184,43
580 REM
582 REM THEN THE NAV TRACK
583 REM
584 HCOLOR= 2
585 FOR I = 50 TO 170:J = 142 -I/2: HPLOT I,J: NEXT
587 FOR J = 5 TO 100:I = 178 -J/2: HPLOT I,J: NEXT
590 HOME : VTAB 23: PRINT "HIT RETURN TO FLY THIS AGAIN": PRINT "ANY OTHER KEY FOR MENU": GET A$
595 IF ASC(A$) = 13 THEN 70
596 PRINT CHR$(4)
598 PRINT CHR$(4);"RUN MENU"
599 END
600 TEXT : HOME : PRINT "YOU ARE CLEARED";
601 PRINT " FOR DAYTONA BEACH"
602 PRINT : PRINT "REGIONAL (DAB) ILS APPROACH TO RWY 6L"
630 PRINT : PRINT "INTERCEPT THE ILS AND FLY INBOUND"
640 PRINT : PRINT "TOP OMNI IS ILS"
670 PRINT : PRINT "MAINTAIN AT OR ABOVE 1600 TILL INBOUND"
680 PRINT : PRINT "PAST THE FINAL APPROACH FIX"
690 PRINT : PRINT "COPYRIGHT 1981 BY VERNON BROWN": PRINT "2110 N 2ND ST": PRINT "CABOT ARK 72023 (501) 843 2988": PRINT
6000 PRINT : PRINT "HIT ANY KEY WHEN READY TO FLY": GET A$: HOME : RETURN